<%-- 
  - Author: Neha Chauhan
  - Date: 03-Apr-'2011
  - Copyright Notice: TRAKHEES
  - Description: form.jsp
 --%>

<%@ include file="/WEB-INF/view/include.jsp"%>
<%@ page import="ae.pcfc.etks.online.web.*"%>
<!--<link
	href='<c:url value="/resources/styles/redmond/jquery-ui-1.8.10.custom.css"/>'
	rel="stylesheet" type="text/css" />
<link
	href='<c:url value="/resources/styles/validation/validationEngine.jquery.css"/>'
	rel="stylesheet" type="text/css" />
<link href='<c:url value="/resources/styles/validation/template.css"/>'
	rel="stylesheet" type="text/css" />
<link
	href='<c:url value="/resources/styles/validation/jquery.validity.css"/>'
	rel="stylesheet" type="text/css" />


<script language="Javascript"
	src='<c:url value="/resources/js/ui/jquery-ui-1.8.10.custom.min.js"/>'></script>
<script language="Javascript" charset="utf-8"
	src='<c:url value="/resources/js/validation/jquery.validate.min.js"/>'></script>
<script language="Javascript"
	src='<c:url value="/resources/js/validation/localization"/>/<spring:message code="page.js.validation"/>'></script>


<script language="Javascript" charset="utf-8" type="text/javascript"
	src='<c:url value="/resources/js/jquery.alerts.js"/>'></script>
<link rel=stylesheet type=text/css
	href='<c:url value="/resources/styles"/>/jquery.alerts.css' />
--><script type="text/javascript">
	$()
			.ready(
					function() {

						$("#Login")
								.validate(
										{
											onfocusout : false,
											onkeyup : false,
											//onclick: false,			
											rules : {
												strUserName : "required",
												strPassword : "required"

											},
											showErrors : function(errorMap,
													errorList) {

												var errors = '<ul>';
												var label;
												if (errorList.length) {
													$.each(errorMap, function(
															name, value) {
														label = $(
																"label[for='"
																		+ name
																		+ "']")
																.html();
														label = value + '['
																+ label + ']';
														errors = errors
																+ '<li>'
																+ label
																+ '</li>';

													});
													errors = errors + '</ul>';
													jAlert('error', errors,
															'<spring:message code="label.errormessage" />');
												}
											}
										});

					});
</script>



<div id="container" dir='<spring:message code="page.dir"/>'
	align='<spring:message code="page.align"/>'>


	<form
		action="${pageContext.request.contextPath}/j_spring_security_check"
		method="post">

		<c:if test="${param.error != null}">
			<script type="text/javascript">
				$(document)
						.ready(
								function() {
									jAlert(
											'error',
											'<spring:message code="error.login.unsuccess" />.<br/><spring:message code="error.login.unsuccess.reason" />: <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/>', '<spring:message code="label.errormessage" />');
								});
			</script>
		</c:if>

		<fieldset>
			<legend>
				<spring:message code="label.client.login" />
			</legend>
		</fieldset>

			<div class="fm-req">
				<spring:message code="label.login.message" />
				<a href="register/newclient/form.htm"> <spring:message
						code="label.login.clickhere" /> </a>
			</div>
			<br>

			<div class="t_form-left">
			<div class="fm-req">
				<label for="j_username"> <spring:message
						code="label.client.username" /> </label> <input type='text'
					id='j_username' name='j_username' size="30" maxlength="100" />

			</div>


			<div class="fm-req">
				<label for="j_password"> <spring:message
						code="label.client.password" /> </label> <input type="password"
					id='j_password' name='j_password' size="30" maxlength="100" />

			</div>
			
			<div>
				<div class="fm-multi">
				<label for="_spring_security_remember_me">
					<spring:message code="client.remember.password" />  
				</label>
					<input type="checkbox"
						name="_spring_security_remember_me"
						id="_spring_security_remember_me">
				</div>

			</div>

			<br />
			<div class="fm-req">
				<a href="register/password/form.htm"
					title="<spring:message code="client.forgot.password" />"><spring:message
						code="client.forgot.password" /> </a><br /> <a
					href="register/inquirestatus/form.htm"
					title="<spring:message code="client.inquire.status" />"><spring:message
						code="client.inquire.status" /> </a><br /> <a
					href="register/recallpin/form.htm"
					title="<spring:message code="client.recall.pin" />"><spring:message
						code="client.recall.pin" /> </a><br />
			</div>
			</div>			
			<div id="fm-submit" class="fm-req">
				<input type="submit" name="submit"
					value="<spring:message code="label.button.submit" />" class="t_btns submit"/>

			</div>

	</form>
</div>
